/*
 * Simulator.h
 *
 *  Created on: 24 nov 2011
 *      Author: Robert
 */

#ifndef SIMULATOR_H_
#define SIMULATOR_H_


#include <vector>
#include "utils/Vector2.h"
#include "utils/EventDispatcher.h"


class Simulator : public EventDispatcher
{
	public:
		Simulator();
		~Simulator();


	// Control interface
	public:
		void step();
		void start();
		void pause();
		void running() const;
		void reset();


	// Display interface
	public:
		// POD
		struct ObjectState {
			int id;
			int color;
			Vector2<float> position;
			Vector2<float> attitude;
			Vector2<float> velocity;
		};
		struct WorldBox {
			double x1, y1, x2, y2;
		};

		WorldBox getBox() const;
		std::vector<ObjectState> getObjects() const;

		// OBJECT_ADDED
		// OBJECT_REMOVED
		// OBJECT_CHANGED


	private:
		unsigned long time_;
		unsigned long timeStep_;


};

#endif /* SIMULATOR_H_ */
